home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / IDE / SUBARTIC / RELEASE.ZIP / sub_arctic / constraints / constraint.java < prev    next >
Encoding:
Java Source  |  1996-10-04  |  2.8 KB  |  85 lines

  1.  
  2. package sub_arctic.constraints;
  3.  
  4. /**
  5.  * Interface for objects that represent constraints.  A constraint 
  6.  * consists of an encoding (an integer) and a reference to constraint_impl 
  7.  * object that nows how to interpret that encoding (or provides the full 
  8.  * contents of the constraint itself).  Finally, it also provides a few 
  9.  * methods for querying the properties of the constraint.
  10.  *
  11.  * @author Scott Hudson
  12.  */
  13. public interface constraint {
  14.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  15.  
  16.   /** 
  17.    * Encoding of constraint as an integer.<p> 
  18.    *
  19.    * @see constraints.std_encoding_consts
  20.    * @return int the encoding value for the constraint
  21.    */ 
  22.   public int encoding();
  23.  
  24.   /** 
  25.    * The implementation object for this constraint. 
  26.    * 
  27.    * @see constraints.std_constraint_impl
  28.    * @return constraint_impl the implementation object for this constraint.
  29.    * */
  30.   public constraint_impl impl();
  31.  
  32.   /** 
  33.    * Orientation of the constraint.  This is a bitset made up of any of:
  34.    * std_encoding_consts.HORIZONTAL, std_encoding_consts.VERTICAL, and/or
  35.    * std_encoding_consts.NOT_ORIENTED.
  36.    *
  37.    * @see constraints.std_encoding_consts
  38.    * @return int the bitset for the orientation(s) of this constraint
  39.    */
  40.   public int orientation();
  41.  
  42.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  43.  
  44.   /** 
  45.    * Indicate if this constraint is actually encoding for no constraint. 
  46.    * @return boolean true if this constraint represents no constraint.
  47.    */
  48.   public boolean is_none();
  49.  
  50.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  51.  
  52.   /** 
  53.    * Indicate if this constraint is encoding for an external constraint. 
  54.    * @return boolean true if this constraint is an external (AKA heavyweight)
  55.    *                      constraint
  56.    */
  57.   public boolean is_external();
  58.  
  59.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  60.  
  61.   /** Convert to a human readable string */
  62.   public String toString();
  63.  
  64.   /** Convert to a terse human readable string */
  65.   public String tag();
  66.  
  67.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  68. }
  69. /*=========================== COPYRIGHT NOTICE ===========================
  70.  
  71. This file is part of the subArctic user interface toolkit.
  72.  
  73. Copyright (c) 1996 Scott Hudson and Ian Smith
  74. All rights reserved.
  75.  
  76. The subArctic system is freely available for most uses under the terms
  77. and conditions described in 
  78.   http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html 
  79. and appearing in full in the lib/interactor.java source file.
  80.  
  81. The current release and additional information about this software can be 
  82. found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
  83.  
  84. ========================================================================*/
  85.